<template>
  <div class="mainChatWrapper">
    <div class="mainChatContent">
      <LeftMenu @onNotify="onNotify" @onChat="onChat" @onSpace="onSpace" @onSetUp="onSetUp" />
      <nuxt-child />
    </div>
  </div>
</template>

<script lang="ts">
import { Component } from 'nuxt-property-decorator'
import LeftMenu from '@/components/chat/LeftMenu.vue'
import { IArr } from '@/components/chat/const'
import { BaseVue } from '@/plugins/base-vue'
@Component({
  layout: 'default',
  components: {
    LeftMenu,
  },
})
export default class MainChat extends BaseVue {
  // 通知页面
  onNotify(item: IArr) {
    this.$router.push(`/earth/notify`)
    console.log('通知页面', item)
  }
  // 聊天大厅
  onChat(item: IArr) {
    this.$router.push(`/earth/chat`)
    console.log('聊天大厅', item)
  }
  // 空间
  onSpace(item: IArr) {
    this.$router.push(`/earth/space`)
    console.log('空间', item)
  }
  // 个人设置
  onSetUp(item: IArr) {
    this.$router.push(`/earth/setup/profile`)
  }
}
</script>

<style lang="scss" scoped>
.mainChatWrapper {
  overflow: hidden;
  height: calc(100% - 90px);
  background: #171821;

  .mainChatContent {
    height: 100%;
    display: flex;
  }

  ::v-deep .rightView {
    display: flex;
    width: 100%;
    height: 100%;

    .rightViewLeftWrapper {
      overflow-y: auto;

      &::-webkit-scrollbar {
        height: 0;
        width: 0;
        color: transparent;
      }

      box-sizing: border-box;
      width: 250px;
      height: 100%;
      border-right: 1px solid#2a292e;
      background-color: #1c1d26;

      .followWrapper {

        .top10,
        .hot10 {
          padding: 15px;
          color: #ffff;
        }

        ul {
          height: 300px;
          overflow: auto;
          list-style: none;

          li.follow {
            &:hover {
              transition: box-shadow 0.5s;
              box-shadow: rgba(255, 255, 255, 0.25) 0px 54px 55px,
                rgba(255, 255, 255, 0.12) 0px -12px 30px,
                rgba(255, 255, 255, 0.12) 0px 4px 6px,
                rgba(255, 255, 255, 0.17) 0px 12px 13px,
                rgba(255, 255, 255, 0.09) 0px -3px 5px;
            }

            cursor: pointer;
            box-sizing: border-box;
            display: flex;
            padding: 10px;
            margin: 12px auto;
            width: 90%;
            background-color: #171821;
            border-radius: 10px;

            img.left {
              padding-right: 10px;
            }

            div.right {
              display: flex;
              justify-content: center;
              flex-flow: column wrap;
            }
          }
        }
      }
    }

    .rightViewCenterWrapper {
      overflow: auto;
      width: calc(100% - 250px);
      height: 100%;

      .chatMessageWrapper {
        box-sizing: border-box;
        padding: 15px;
        height: calc(100% - 85px);
      }

      .chatSendWrapper {
        display: flex;
        align-items: center;
        height: 85px;
        border-top: 1px solid #2a292e;

        i {
          color: #ffffff;
          font-size: 30px;
          padding: 15px;
          cursor: pointer;
        }

        .editcontent {
          // height: 30px;
          width: calc(100% - 90px - 90px);
          overflow-y: auto;
          caret-color: #ffff;
          color: #ffff;
          outline: none;
          // border-bottom: 1px solid #fff;
          border-radius: 5px;
          line-height: 30px;
        }

        .attachment {
          display: flex;
          align-items: center;
          justify-content: center;
          height: 100%;
        }

        .sender {
          cursor: pointer;
          display: flex;
          align-items: center;
          justify-content: center;
          width: 90px;
          height: 100%;
          border-left: 1px solid #2a292e;

          i {
            color: #25d366;
            font-size: 30px;
          }
        }
      }
    }

    .rightViewRightWrapper {
      box-sizing: border-box;
      width: 250px;
      height: 100%;
      border-left: 1px solid #2a292e;
    }
  }
}
</style>
